<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="/static/css/topnav.css">
</head>
<body>
<div class="home" style="padding: 1% 1% 1% 1%">
    <a href="/user/get-all-consumer">返回首页</a>
</div>
<div class="back">
    <div class="a">
        <h1>用户修改</h1>
    </div>
    <c:if test="${not empty consumer}">
        <div class="neirong">
            <div class="b">
                <table border="0">
                    <tr>
                        <td align="right">用户头像：</td>
                        <td>
                            <form method="post" enctype="multipart/form-data"
                                  action="/user/update-consumer-headPortrait?consumerUuid=${consumer.consumerUuid}">
                                <img src="${consumer.consumerHeadPortrait}" width="70px" height="60px">
                                <input type="file" name="myFile"/>
                                <input type="submit" value="上传" />
                            </form>
                        </td>
                    </tr>
                    <form action="/user/update-consumerInfo" method="post">
                        <tr>

                            <td align="right">用户UUID：</td>
                            <td><input type="text" class="kuang" name="consumerUuid" value="${consumer.consumerUuid}"
                                       readonly></td>
                        </tr>
                        <tr>
                            <td align="right">用户名：</td>
                            <td><input type="text" class="kuang" name="consumerName" value="${consumer.consumerName}">
                            </td>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">用户名密码：</td>
                            <td>
                                <input type="text" class="kuang" name="consumerPassword"
                                       value="${consumer.consumerPassword}">
                            </td>
                        </tr>
                        <tr>
                            <td align="right">手机号码：</td>
                            <td><input type="text" class="kuang" name="phoneNumber" value="${consumer.phoneNumber}">
                            </td>
                        </tr>
                        <tr>
                            <td align="right">用户邮箱：</td>
                            <td>
                                <input type="text" class="kuang" name="consumerEmail" value="${consumer.consumerEmail}">
                            </td>
                        </tr>

                        <tr>
                            <td align="right">用户权限：</td>
                            <td>

                                <select name="consumerRoot">
                                    <c:choose>
                                        <c:when test="${consumer.consumerRoot == 0}">
                                            <option value="0">普通用户</option>
                                        </c:when>
                                        <c:when test="${consumer.consumerRoot == 1}">
                                            <option value="1">管理员</option>
                                        </c:when>
                                        <c:when test="${consumer.consumerRoot == 2}">
                                            <option value="2">超级管理员</option>
                                        </c:when>
                                    </c:choose>
                                    <option>请选择</option>
                                    <option value="0">普通用户</option>
                                    <option value="1">管理员</option>
                                    <option value="2">超级管理员</option>
                                </select>
                        </tr>
                        <tr>
                            <td align="right">用户状态：</td>
                            <td>
                                <select name="consumerStatus">
                                    <c:choose>
                                        <c:when test="${consumer.consumerStatus == 0}">
                                            <option value="0">启用</option>
                                        </c:when>
                                        <c:when test="${consumer.consumerStatus == 1}">
                                            <option value="1">停用</option>
                                        </c:when>
                                        <c:when test="${consumer.consumerStatus == 2}">
                                            <option value="2">冻结</option>
                                        </c:when>
                                    </c:choose>
                                    <option>请选择</option>
                                    <option value="0">启用</option>
                                    <option value="1">停用</option>
                                    <option value="2">冻结</option>
                                </select>
                            </td>
                        </tr>

                        <tr>
                            <td align="right">用户注册时间：</td>
                            <td>
                                    ${consumer.consumerRegistrationDate}
                            </td>
                        </tr>
                        <tr>
                            <td align="right">最后修改时间：</td>
                            <td>
                                    ${consumer.tableUpdateDate}
                            </td>
                        </tr>
                        <tr align="center">
                            <td colspan="2">
                                <input type="submit" value="提交" class="anniu">
                            </td>
                        </tr>
                    </form>
                </table>
            </div>
        </div>
    </c:if>
</div>
</body>

<style>
    .home a {
        font-size: 30px;
        text-decoration: none;
    }


    div.back {
        padding: 0% 0% 20% 30%;
        width: 35%;
        margin-left: 6%;
    }

    div.a {
        border-style: solid;
        border-color: deeppink;
        border-radius: 15px;
        text-align: center;
    }

    body {
        background-image: url("/static/img/kb.jpg");
    }

    table {
        /*width: 520px;*/
        /*background-color: FFAEB9;*/
        color: deeppink;
    }

    td {
        padding: 5px 0px 5px 10px;
        font-weight: bold;
    }

    h1 {
        color: deeppink;
    }

    .kuang {
        border-radius: 15px;
        padding: 6px 30px 6px 30px;
        border: gray solid 1px;
        background-color: #F5FFFA;
    }

    select, textarea {
        border-radius: 7px;
        padding: 6px 80px 6px 10px;
        border: gray solid 1px;
        background-color: #F5FFFA;

    }


    input[type="file"] {
        border-radius: 7px;
        margin-top: 1%;
        width: 19%;
        /*padding: 6px 10px 6px 10px;*/
        /*border: gray solid 1px;*/
        background-color: #F5FFFA;
    }

    .anniu {
        border-radius: 7px;
        padding: 6px 30px;
        background-color: #F5FFFA;
        font-size: 14px;
        font-weight: bold;
    }

    .neirong {
        margin-top: 10px;
        border-style: double;
        border-color: #ffffff;
        border-radius: 15px;
        border-width: medium;
        padding-bottom: 9px;
    }

    input[type="submit"] {

    }

</style>
</html>

